home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98a.txt
/
000161_icon-group-sender _Wed Apr 15 07:58:43 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id HAA15011
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Wed, 15 Apr 1998 07:58:42 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA25693; Wed, 15 Apr 1998 07:58:41 -0700
From: DLucido <DLucido@aol.com>
Message-Id: <78201599.35340ec3@aol.com>
Date: Tue, 14 Apr 1998 21:34:57 EDT
To: icon-group@optima.CS.Arizona.EDU
Mime-Version: 1.0
Subject: Tables of records
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Mailer: AOL 3.0 16-bit for Windows sub 86
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 787
I am brand new to Icon (Just got the book this week) and I have been
experimenting
with some code to test my understanding. While the following is not in any
doucumentation I have found, it works. I defined a record and created a table
of
records with the following code:
record node(value,lchild,rchild)
procedure main(arg)
tree:=table()
tree[1]:=node(2,3,"Hello")
tree[2]:=node(5,6,"World")
tree[3]:=node(0,1,"Oops")
every i:=key(tree)do
write(i,":",tree[i].rchild)
end
While the order of the keys in unpredictable, the code can store a table of
records.
Is this a feature or something that should be avoided?
David Lucido
dlucido@aol.com